package com.hcc.export.helper.core.config;

import com.hcc.export.helper.core.domain.ExportTask;
import lombok.extern.slf4j.Slf4j;

import java.io.File;

@Slf4j
public class DefaultExportHelperSupport implements ExportHelperSupport {

    @Override
    public String upload(File file) {
        return file.getAbsolutePath();
    }

    @Override
    public void afterExportSuccess(ExportTask exportTask) {
        log.info("导出任务id: [{}]导出成功", exportTask.getRecordId());
    }

    @Override
    public void afterExportFailed(ExportTask exportTask, Exception e) {
        log.error(String.format("导出任务id: [%s]导出失败", exportTask.getRecordId()), e);
    }

}
